# 基于java镜像
FROM openjdk:8
# 作者
LABEL authors="majianwei"
# 添加jar包到容器并改名
ADD target/basic-0.0.1-SNAPSHOT.jar /data/springboot/springboot.jar
# 创建镜像时，修改系统时区
RUN ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo Asia/Shanghai > /etc/timezone
# 将日志挂载到宿主机的目录
VOLUME /data/logs
# 运行jar包
# ENTRYPOINT ["java", "-Dfile.encoding=utf-8", "-Xms512M", "-Xmx1024M", "-jar", "/data/springboot/springboot.jar", "--logging.file.name=/data/logs/springboot.out"]
ENTRYPOINT ["java", "-Dfile.encoding=utf-8", "-Xms512M", "-Xmx1024M", "-jar", "/data/springboot/springboot.jar"]
